<template>
	<view style="width: 100%;margin: auto;">
		<!-- <lodings ></lodings> -->
		<web-view :webview-styles="webviewStyles" :src="activity"></web-view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			activity: '',
			webviewStyles: {
				progress: {
					color: '#FF3333'
				}
			}
		};
	},
	onLoad(option) {
		// this.showActivity()"&activityId="+id
		this.activity = option.url + '?token=' + option.token + '&activityId=' + option.activityId;
	},
	onReady() {},
	methods: {
		// 活动
		showActivity: function() {
			let opts = {
				way: true, //true JSON请求；false 表单请求
				method: 'post',
				url: 'other/getActivityAddress'
			};
			let data = {};
			this.http.httpTokenRequest(opts, data).then(res => {
				//打印请求返回的数据
				console.log(res);
				if (res.code == '200') {
					this.activity = res.data;
				} else {
					this.$refs.uToast.show({
						title: res.message,
						type: 'error'
					});
				}
			});
		}
	}
};
</script>

<style></style>
